<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>

    <title>Service UI Fragment</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag"/>
</head>

<body>
<main class="container mt-3 mb-3" role="main">
    <div th:fragment="submitButton (messageKey)">

        <button
                class="mdc-button mdc-button--raised"
                accesskey="l"
                name="submit"
                th:if="${recaptchaSiteKey == null}"
                type="submit">
            <span class="mdc-button__label" th:text="#{${messageKey}}">Login</span>
        </button>

        <span th:switch="${recaptchaVersion}" th:unless="${recaptchaSiteKey == null}">
            <span th:case="'v2'" th:remove="tag">
                <button accesskey="l"
                        class="mdc-button mdc-button--raised"
                        name="submit"
                        th:unless="${recaptchaSiteKey != null AND recaptchaInvisible != null AND recaptchaInvisible}"
                        type="submit"
                        value="Login3">
                    <span class="mdc-button__label" th:text="#{${messageKey}}">Login</span>
                </button>
                <button accesskey="l"
                        class="mdc-button mdc-button--raised"
                        th:attr="data-sitekey=${recaptchaSiteKey}, data-badge=${recaptchaPosition}"
                        data-callback="onRecaptchaV2Submit"
                        name="submitBtn"
                        th:if="${recaptchaSiteKey != null AND recaptchaInvisible != null AND recaptchaInvisible}">
                    <span class="mdc-button__label" th:text="#{${messageKey}}"></span>
                </button>
            </span>

            <span th:case="'v3'" th:remove="tag">
                <button accesskey="l"
                        class="mdc-button mdc-button--raised"
                        name="submit"
                        th:attr="data-sitekey=${recaptchaSiteKey}"
                        th:if="${recaptchaSiteKey != null}"
                        th:value="#{screen.welcome.button.login}"
                        type="submit"
                        value="Login3">
                    <span class="mdc-button__label" th:text="#{${messageKey}}"/>
                </button>
             </span>
        </span>

    </div>
</main>
</body>

</html>


